package com.eightywork.life.activity;


import cn.jpush.android.api.JPushInterface;

import com.eightywork.life.R;
import com.eightywork.life.util.AndroidUtil;
import com.umeng.analytics.MobclickAgent;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;

public class AboutActivity extends BaseActivity implements OnClickListener{
	private ImageButton leftButton, rightButton;
	private TextView version;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);
		initHeader("关于我们");
		version = (TextView) findViewById(R.id.version);
		leftButton = (ImageButton) findViewById(R.id.button_left);
		rightButton = (ImageButton) findViewById(R.id.button_right);
		rightButton.setVisibility(View.GONE);
		leftButton.setOnClickListener(this);
		version.setText("生活圈 " +AndroidUtil.getApplicationVersion(this));
	}

	@Override
	public void onClick(View v) {
		if(v == leftButton){
			finish();
		}
	}
	
	@Override
	public void onResume() {		
		super.onResume();
		JPushInterface.onResume(this);
	    MobclickAgent.onResume(this);
	}
	
	@Override
	public void onPause() {
	    super.onPause();
		JPushInterface.onPause(this);
	    MobclickAgent.onPause(this);
	}

}
